package learn_concurrent._4;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class T3 {
	static final Logger logger = LoggerFactory.getLogger(T3.class);

	static final Object lock = new Object();
	public static void main(String[] args) throws InterruptedException {
		
		Thread t1 = new Thread(() -> {
			synchronized (lock) {
				logger.info("working...");
				try {
					lock.wait();
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
				logger.info("other work...");
			}
		}, "t1");
		
		t1.start();
		
		t1.wait();
		
		
	}

}
